package com.viknix.threadpool.manager.config.dump.condition;

import com.viknix.threadpool.manager.http.util.PropertyUtil;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @Author: Dongqi
 * @Date: 2021/11/22 10:42
 * @Version 1.0
 * @Description: 根据条件判断是否使用 EmbeddedStorage。
 */
public class ConditionOnEmbeddedStorage implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return PropertyUtil.isEmbeddedStorage();
    }
}
